package org.jeecg.modules.jxc.homepage.config;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * @description: 分页
 * @company:
 * @author: Jack Wang
 * @version: 1.0
 * @create: 2021-12-21 10:16:48
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PageResult<T> {
    private List<T> records;
    private Integer total;
    private Integer pageSize = DEFAULT_PAGE_SIZE;
    private final static Integer DEFAULT_PAGE_SIZE = 10;

    public PageResult(List<T> records, Integer total) {
        this.records = records;
        this.total = total;
    }
}
